package god;

import java.util.Scanner;

public class J09Account {
	public static void main(String[] agrs) {
		
		int aid[] = new int[2];
		int deposit[] = new int[2];
		int withdraw[] = new int[2];
		int balance[] = new int[2];
		double interestRate[] = new double[2];
		double monthlyInterestRate[] = new double[2];
		String dateCreated[] = new String[2];
		
		inputAccount(aid, dateCreated, interestRate, balance, deposit, withdraw);
		getMonthlyinterestRate(monthlyInterestRate, interestRate);
		WithDraw(balance, withdraw);
		Deposit(balance, deposit);
		
		System.out.println(aid[1]);
		System.out.println(interestRate[1]);
		System.out.println(monthlyInterestRate[1]);
		System.out.println(dateCreated[1]);
		System.out.println(withdraw[1]);
		System.out.println(deposit[1]);
		System.out.println(balance[1]);
	}
	
	public static void inputAccount(int aid[], String dateCreated[], double interestRate[], int[] balance, int deposit[], int withdraw[]) {
		Scanner sc = new Scanner(System.in);
		System.out.println("계좌번호를 입력해주세요.");
		aid[1] = sc.nextInt();
		System.out.println("통장 개설일을 입력해주세요.");
		dateCreated[1] = sc.next();
		System.out.println("연간 이자율을 입력해주세요.");
		interestRate[1] = sc.nextInt();
		System.out.println("잔액을 입력해주세요.");
		balance[1] = sc.nextInt();
		System.out.println("입금액을 입력해주세요.");
		deposit[1] = sc.nextInt();
		System.out.println("인출액을 입력해주세요.");
		withdraw[1] = sc.nextInt();
		sc.close();
	}
	
	public static void getMonthlyinterestRate(double monthlyInterestRate[], double interestRate[]) {
		monthlyInterestRate[1] = interestRate[1] / 12;
	}
	
	public static void WithDraw(int balance[], int withdraw[]) {
		balance[1] = balance[1] - withdraw[1];
	}
	
	public static void Deposit(int balance[], int deposit[]) {
		balance[1] = balance[1] + deposit[1];
	}

}
